﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="product.aspx.cs" Inherits="RicciWebsite.admin.products.product" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>

    <script src="../../js/tab.js" type="text/javascript"></script>

    <script src="../../My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script type="text/javascript">
        function beginTab(tabIndex) {
            try {
                tabClass("tab1", 'click', tabIndex);
            }
            catch (ex) {
                alert(ex);
                //setTimeout("beginTab();", 1000);
            }
        }  
    </script>

</head>
<body>
    <form id="aspnetForm" runat="server">
    <table cellspacing="0" cellpadding="5" width="100%" border="0">
        <tr>
            <td class="content_head">
                当前位置：管理中心 &gt; 产品维护
            </td>
        </tr>
        <tr>
            <td height="2">
            </td>
        </tr>
    </table>
    <div id="man_zone">
        <dl id="tab1" class="tab" name="tab1">
            <dt>产品基本信息</dt>
            <dt>产品图片</dt>
            <dt>自定义属性</dt>
            <dd style="display: block">
                <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
                    <tr>
                        <td width="18%" class="left_title_1">
                            产品名称
                        </td>
                        <td width="82%">
                            <asp:TextBox ID="txtpname" runat="server" Width="60%"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfv1" ControlToValidate="txtpname" Display="Dynamic"
                                runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td width="18%" class="left_title_2">
                            产品分类
                        </td>
                        <td width="82%">
                            <asp:DropDownList ID="txtpcid" runat="server">
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="left_title_1">
                            规格型号
                        </td>
                        <td>
                            <asp:TextBox ID="txtpmodel" runat="server" Width="60%"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="left_title_2">
                            关键字
                        </td>
                        <td>
                            <asp:TextBox ID="txtkeywords" runat="server" Width="60%"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="left_title_1">
                            页面描述
                        </td>
                        <td>
                            <asp:TextBox ID="txtdescription" runat="server" Width="60%" TextMode="MultiLine"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td width="18%" class="left_title_2">
                            详细信息
                        </td>
                        <td width="82%">
                            <hxjfck:FCKeditor ID="txtdetail" runat="server" Height="400px">
                            </hxjfck:FCKeditor>
                        </td>
                    </tr>
                    <tr>
                        <td class="left_title_1">
                            发布时间
                        </td>
                        <td>
                            <asp:TextBox ID="txtsubtime" runat="server" Width="70px" onFocus="WdatePicker({readOnly:true})"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfv3" ControlToValidate="txtsubtime" Display="Dynamic"
                                runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td width="18%" class="left_title_2">
                            状态
                        </td>
                        <td>
                            <select id="txtstatus" name="txtstatus" runat="server">
                                <option value="0">未发布</option>
                                <option value="1" selected>已发布</option>
                                <option value="2">推荐</option>
                            </select>
                        </td>
                    </tr>
                </table>
            </dd>
            <dd>
                <div style="overflow: visible; height: 300px">
                    <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
                        <tr>
                            <td class="left_title_1" width="18%">
                                产品图片
                            </td>
                            <td>
                                <asp:FileUpload ID="filephoto" runat="server" />
                                <asp:Image ID="imgphoto" runat="server" />
                            </td>
                        </tr>
                        <tr>
                            <td class="left_title_2" width="18%">
                                更多图片
                            </td>
                            <td>
                                <hxjfile:HMultipleFiles ID="mfiles" runat="server" AllowExtensions="gif,jpg,jpeg,bmp,png" />
                            </td>
                        </tr>
                        <tr>
                            <td class="left_title_1" width="18%">
                            </td>
                            <td>
                                <asp:Repeater ID="rptfiles" runat="server" OnItemCommand="rptfiles_ItemCommand">
                                    <HeaderTemplate>
                                        <ul>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <li>
                                            <asp:Image ID="imgfiles" ImageUrl='<%# Eval("filepath") %>' AlternateText='<%# Eval("filename") %>'
                                                runat="server" />
                                            <asp:LinkButton ID="lnkbtnDelete" runat="server" CausesValidation="false" CommandName="Del"
                                                CommandArgument='<%# Eval("attid") %>' OnClientClick='<%# GetConfirm(Eval("filename")) %>'>删除</asp:LinkButton>
                                        </li>
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        </ul></FooterTemplate>
                                </asp:Repeater>
                            </td>
                        </tr>
                    </table>
                </div>
            </dd>
            <dd>
                <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
                    <tr>
                        <td class="left_title_1" width="18%">
                            属性名称
                        </td>
                        <td>
                            <asp:TextBox ID="ppppname" runat="server" Width="60%"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="rfv10" ControlToValidate="ppppname" Display="Dynamic"
                                runat="server" ErrorMessage="*" ValidationGroup="att"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="left_title_2" width="18%">
                            属性内容
                        </td>
                        <td>
                            <hxjfck:FCKeditor ID="ppdetail" runat="server" Height="400px">
                            </hxjfck:FCKeditor>
                        </td>
                    </tr>
                    <tr>
                        <td class="left_title_1" width="18%">
                            &nbsp;
                        </td>
                        <td>
                            <asp:Button ID="btnAddAtt" runat="server" Text="添加" UseSubmitBehavior="true" ValidationGroup="att"
                                OnClick="btnAddAtt_Click" />
                            <asp:Button ID="btnCancel" runat="server" Text="取消" CausesValidation="false" Visible="false"
                                OnClick="btnCancel_Click" />
                        </td>
                    </tr>
                </table>
                <asp:HiddenField ID="hidppid" runat="server" />
                <table id="grid" class="table_list" cellspacing="1" cellpadding="2" rules="all" border="0">
                    <thead>
                        <tr class="table_list_head">
                            <td>
                                #
                            </td>
                            <td>
                                属性名称
                            </td>
                            <td>
                                属性内容
                            </td>
                        </tr>
                    </thead>
                    <tbody>
                        <asp:Repeater ID="rptAttList" runat="server" OnItemCommand="rptAttList_ItemCommand">
                            <ItemTemplate>
                                <tr class="table_list_tr">
                                    <td>
                                        <asp:LinkButton ID="lnkbtnDelete" CommandName="Del" CausesValidation="false" runat="server"
                                            CommandArgument='<%# Eval("ppid") %>' OnClientClick="return confirm('确认删除?')">删除</asp:LinkButton>
                                        &nbsp; &nbsp;
                                        <asp:LinkButton ID="lnkbtnUpdate" runat="server" CausesValidation="false" CommandName="Upd"
                                            CommandArgument='<%# Eval("ppid") %>'>编辑</asp:LinkButton>
                                    </td>
                                    <td>
                                        <%# Eval("ppname") %>
                                    </td>
                                    <td>
                                        <%# Eval("detail") %>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
            </dd>
        </dl>
        <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
            <tr>
                <td class="left_title_2" width="18%">
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnsubmit" runat="server" Text="提交" UseSubmitBehavior="true" OnClick="btnsubmit_Click" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="button" value="取消" id="btnCancle" onclick="window.location.href='productlist.aspx'" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
